package cn.com.pg.b2b.pd.truck.appointment.management.service.api;


import cn.com.pg.b2b.pd.truck.appointment.management.service.model.dto.LineDTO;
import cn.com.pg.b2b.pd.truck.appointment.management.service.service.LineService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 中转线路表 前端控制器
 * </p>
 *
 * @author 王开琦
 * @since 2023-06-08
 */
@RestController
@Slf4j
@RequestMapping("/line")
public class LineController {
    private final LineService lineService;

    public LineController(LineService lineService) {
        this.lineService = lineService;
    }

    /**
     * 新增中转线路
     */
    @PostMapping("add")
    public ResponseEntity<Void> add(@RequestBody LineDTO lineDTO) {
        lineService.add(lineDTO);
        return ResponseEntity.ok().build();
    }

}

